<!DOCTYPE html>
<html lang='en'>

<head>
  <meta charset='UTF-8'>
  <meta http-equiv='X-UA-Compatible' content='IE=edge'>
  <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  <title>Document</title>
  <script src='https://cdn.jsdelivr.net/npm/vue/dist/vue.js'></script>
</head>

<body>
  <div id='app'>
    <span v-if="isEmail">
      <label for="email">邮箱登录</label>
      <input type="text" id="email" placeholder="邮箱登录" key="email">
    </span>
    <span v-else>
      <label for="account">用户账号</label>
      <input type="text" id="account" placeholder="用户账号" key="account">
    </span>
    <button @click="changeStatus">切换类型</button>
  </div>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        message: 'hello world',
        isEmail: false
      },
      methods: {
        changeStatus() {
          this.isEmail = !this.isEmail
        }
      }
    })
  </script>
</body>

</html>